-- GENERATED SPELL FOR [Prince Raze] --


function spell0_10647(pUnit, Event) --@Charged Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(16570,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10647', 7000, 1)
end

function spell1_10647(pUnit, Event) --@Fire Nova,Self--
pUnit:FullCastSpellOnTarget(11969,pUnit)
pUnit:RegisterEvent('Sorts_10647', 2000, 1)
end

function spell2_10647(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10647', 3000, 1)
end

function spell3_10647(pUnit, Event) --@Gift of the Xavian,Self--
pUnit:FullCastSpellOnTarget(6925,pUnit)
pUnit:RegisterEvent('Sorts_10647', 5000, 1)
end

function Sorts_10647(pUnit, Event)
local choix_sorts_10647 = math.random(0, 3)
if choix_sorts_10647 == 0 then
pUnit:RegisterEvent('spell0_10647', 1, 1)
end
if choix_sorts_10647 == 1 then
pUnit:RegisterEvent('spell1_10647', 1, 1)
end
if choix_sorts_10647 == 2 then
pUnit:RegisterEvent('spell2_10647', 1, 1)
end
if choix_sorts_10647 == 3 then
pUnit:RegisterEvent('spell3_10647', 1, 1)
end
end

function mob10647_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10647', math.random(1500, 3000), 1)
end

function mob10647_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10647_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10647_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10647, 1, 'mob10647_Action')
RegisterUnitEvent(10647, 2, 'mob10647_Leave')
RegisterUnitEvent(10647, 3, 'mob10647_Kill')
RegisterUnitEvent(10647, 4, 'mob10647_Die')
